
const auth = {
    state: {
        authBtns: JSON.parse(sessionStorage.getItem('authBtns')) || []
    },
    mutations: {
        setAuthBtns: (state, btns) => {
            sessionStorage.setItem('authBtns', btns && btns.length > 0 ? JSON.stringify(btns) : JSON.stringify([]));
            state.authBtns = btns;
        }
    },
    actions: {
        setAuthBtns({ commit }, log) {
            commit("setAuthBtns", log);
        }
    },
    getters: {
        getAuthBtns(state) {
            return state.authBtns;
        }
    }
}
export default auth